package com.zhongge.operations;

import com.zhongge.book.BookList;

@SuppressWarnings("all")
/**
 * @ClassName ShowBook
 * @Description TODO 显示图书
 * @Author zhongge
 * @Date 2025/7/14 19:32
 * @Version 1.0
 */
public class ShowBook implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("所有的图书的显示如下：");
        for (int i = 0; i < bookList.getUsedSize(); i++) {
            System.out.println(bookList.getBook(i));//底层调用toString方法
        }
    }
}
